home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / plotting / us_dol11 / sinxy.for < prev    next >
Text File  |  1993-11-30  |  689b  |  28 lines

  1. c     print*,'nx,ny=?'
  2. c     read*,nx,ny
  3.        nx=100            ! grid dimensions NX and NY
  4.        ny=100            !
  5.       
  6.        Pi=3.141592654    !well known fact
  7.       
  8.        dx=1.5*Pi/(nx-1.) !the grid step along the X coordinate
  9. c     dy=1.5*Pi/(ny-1.)
  10.        dy=dx             !the grid step along the Y coordinate
  11.        print*,nx,ny      ! writing the header of a file
  12.       
  13.        y=0
  14.          do i=1,ny   
  15.        x=0
  16.       
  17.               do j=1,nx
  18.                   print*,sin(x*y)   !writing the data
  19.               x=x+dx
  20.               end do
  21.           
  22.         y=y+dy
  23.         end do
  24.         
  25.       stop
  26.       end
  27.       
  28. c     That's it!